package com.bzy.blade_auth.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.bzy.blade_auth.service.RoleJurisdictionService;
import com.bzy.blade_auth.service.RoleService;
import com.bzy.bladeauthapi.entry.RoleJurisdiction;
import com.bzy.bladeauthapi.fegin.RoleJurisdictionFeginClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 角色权限实体数据信息;
 */
@RestController
public class RoleJurisdictionController implements RoleJurisdictionFeginClient {


    @Autowired
    private RoleJurisdictionService roleJurisdictionService;

    /**
     * 议案家角色信息的数据权限;
     * @param roleJurisdiction
     * @return
     */
    @Override
    public R add(@RequestBody RoleJurisdiction roleJurisdiction) {
        return roleJurisdictionService.add(roleJurisdiction);
    }

    /**
     * 修改用户的角色信息;
     * @param roleJurisdiction
     * @return
     */
    @Override
    public R update(@RequestBody RoleJurisdiction roleJurisdiction) {
        return roleJurisdictionService.update(roleJurisdiction);
    }

    /**
     * 删除用户的角色信息;
     * @param roleJurisdiction
     * @return
     */
    @Override
    public R delete(@RequestBody RoleJurisdiction roleJurisdiction) {
        return roleJurisdictionService.delete(roleJurisdiction);
    }

    /**
     * 查询一个角色的数据信息;
     * @param roleJurisdiction
     * @return
     */
    @Override
    public R selOne(@RequestBody RoleJurisdiction roleJurisdiction) {
        return roleJurisdictionService.selOne(roleJurisdiction);
    }

    /**
     * 查询角色和权限的绑定的数据信息;
     * @param roleJurisdiction
     * @return
     */
    @Override
    public R selList(@RequestBody RoleJurisdiction roleJurisdiction) {
        return roleJurisdictionService.selList(roleJurisdiction);
    }
}
